/*
 *  bitstream.h
 *  oE6
 *
 *  Created by Tony Million on 13/12/2008.
 *  Copyright 2008 HowlerTech. All rights reserved.
 *
 */
#pragma once


typedef struct _bitstream_
{
	unsigned char *		data;
	unsigned long		datalength;

	unsigned long		bitoffset;
} bitstream;

void bsinit(bitstream * bs, unsigned char * data, unsigned long datalength);

unsigned long bsgetbits(bitstream * bs, unsigned long numbits);

void bsdismiss(bitstream * bs, unsigned long numbits);
void bsrewind(bitstream * bs, unsigned long numbits);